// Programming_Scala/src/ch12/curried-function-script.scala

val f = ( x: Double, y: Double, z: Double ) => x * y / z
val fc = f.curry

val answer1 = f( 2.0, 5.0, 4.0 )
val answer2 = fc( 2.0 )( 5.0 )( 4.0 )
println( answer1 + " == " + answer2 + "? " + ( answer1 == answer2 ) )

val fc1 = fc( 2.0 )
val fc2 = fc1( 5.0 )
val answer3 = fc2( 4.0 ) 
println( answer3 + " == " + answer2 + "? " + ( answer3 == answer2 ) )
